<template>
  <div class="fy">
    <!-- <Syx-Paging
      :total="pading.total"
      :current="pading.currentPage"
      :pageSize="pading.pageSize"
      @on-change="onChange"
      @on-page-size-change="onpagesizechange"
    ></Syx-Paging> -->
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="pading.currentPage"
      :page-sizes="[10, 20, 30, 50]"
      :page-size="pading.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="pading.total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: ["pading"],
  methods: {
    handleSizeChange(val) {
      this.$emit("change", {
        currentPage: this.pading.currentPage,
        pageSize: val,
      });
    },
    handleCurrentChange(val) {
      this.$emit("change", {
        currentPage: val,
        pageSize: this.pading.pageSize,
      });
    },
    onChange(page) {
      this.$emit("change", {
        currentPage: page.currentPage,
        pageSize: page.currentPageSize,
      });
    },
    onpagesizechange(page) {
      this.$emit("change", {
        currentPage: page.currentPage,
        pageSize: page.currentPageSize,
      });
    },
  },
};
</script>

<style>
.fy {
  display: flex;
  justify-content: center;
}

#app .fy .el-input,
#app .fy .el-select,
#app .fy .el-textarea,
#app .fy .el-date-editor {
  width: auto !important;
}
</style>
